.class Lrexsee/dialog/ChronometerDialog$1;
.super Ljava/lang/Object;
.source "ChronometerDialog.java"

# interfaces
.implements Landroid/widget/Chronometer$OnChronometerTickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/dialog/ChronometerDialog;-><init>(Lrexsee/core/browser/Browser;Ljava/lang/String;ILjava/lang/Runnable;ZZZLjava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/dialog/ChronometerDialog;

.field private final synthetic val$highlightColor:Ljava/lang/String;

.field private final synthetic val$timeout:I


# direct methods
.method constructor <init>(Lrexsee/dialog/ChronometerDialog;ILjava/lang/String;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/dialog/ChronometerDialog$1;->this$0:Lrexsee/dialog/ChronometerDialog;

    iput p2, p0, Lrexsee/dialog/ChronometerDialog$1;->val$timeout:I

    iput-object p3, p0, Lrexsee/dialog/ChronometerDialog$1;->val$highlightColor:Ljava/lang/String;

    .line 77
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onChronometerTick(Landroid/widget/Chronometer;)V
    .locals 8
    .param p1, "c"    # Landroid/widget/Chronometer;

    .prologue
    const-string v7, ">"

    const-string v6, "<font color="

    const-string v5, "</font>"

    .line 80
    invoke-virtual {p1}, Landroid/widget/Chronometer;->getText()Ljava/lang/CharSequence;

    move-result-object v2

    invoke-interface {v2}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lrexsee/core/progress/RexseeProgressCover;->string2second(Ljava/lang/String;)I

    move-result v0

    .line 81
    .local v0, "elapsedTime":I
    iget v2, p0, Lrexsee/dialog/ChronometerDialog$1;->val$timeout:I

    if-lez v2, :cond_1

    iget v2, p0, Lrexsee/dialog/ChronometerDialog$1;->val$timeout:I

    if-lt v0, v2, :cond_1

    .line 82
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog$1;->this$0:Lrexsee/dialog/ChronometerDialog;

    invoke-virtual {v2}, Lrexsee/dialog/ChronometerDialog;->dismiss()V

    .line 83
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog$1;->this$0:Lrexsee/dialog/ChronometerDialog;

    # getter for: Lrexsee/dialog/ChronometerDialog;->mTimeOutRunnable:Ljava/lang/Runnable;
    invoke-static {v2}, Lrexsee/dialog/ChronometerDialog;->access$0(Lrexsee/dialog/ChronometerDialog;)Ljava/lang/Runnable;

    move-result-object v2

    if-eqz v2, :cond_0

    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog$1;->this$0:Lrexsee/dialog/ChronometerDialog;

    # getter for: Lrexsee/dialog/ChronometerDialog;->mTimeOutRunnable:Ljava/lang/Runnable;
    invoke-static {v2}, Lrexsee/dialog/ChronometerDialog;->access$0(Lrexsee/dialog/ChronometerDialog;)Ljava/lang/Runnable;

    move-result-object v2

    invoke-interface {v2}, Ljava/lang/Runnable;->run()V

    .line 89
    :cond_0
    :goto_0
    return-void

    .line 85
    :cond_1
    iget v2, p0, Lrexsee/dialog/ChronometerDialog$1;->val$timeout:I

    sub-int v1, v2, v0

    .line 86
    .local v1, "restTime":I
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog$1;->this$0:Lrexsee/dialog/ChronometerDialog;

    # getter for: Lrexsee/dialog/ChronometerDialog;->mElapsed:Landroid/widget/TextView;
    invoke-static {v2}, Lrexsee/dialog/ChronometerDialog;->access$1(Lrexsee/dialog/ChronometerDialog;)Landroid/widget/TextView;

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "<font color="

    invoke-direct {v3, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v4, p0, Lrexsee/dialog/ChronometerDialog$1;->val$highlightColor:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ">"

    invoke-virtual {v3, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-static {v0}, Lrexsee/core/progress/RexseeProgressCover;->second2string(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "</font>"

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 87
    iget-object v2, p0, Lrexsee/dialog/ChronometerDialog$1;->this$0:Lrexsee/dialog/ChronometerDialog;

    # getter for: Lrexsee/dialog/ChronometerDialog;->mRest:Landroid/widget/TextView;
    invoke-static {v2}, Lrexsee/dialog/ChronometerDialog;->access$2(Lrexsee/dialog/ChronometerDialog;)Landroid/widget/TextView;

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

    sget-object v4, Lrexsee/core/lang/RexseeLanguage;->PREFIX_TIME_REST:Ljava/lang/String;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, "<font color="

    invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, p0, Lrexsee/dialog/ChronometerDialog$1;->val$highlightColor:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ">"

    invoke-virtual {v3, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-static {v1}, Lrexsee/core/progress/RexseeProgressCover;->second2string(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, "</font>"

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method
